Package-level declarations
Functions
Link copied to clipboard
fun SlideToRestore(modifier: Modifier = Modifier, onRestoreStateChanged: (RestoreState) -> Unit = {}, colors: SlideToUnlockColors = DefaultSlideToUnlockColors(), hintTexts: HintTexts = HintTexts.defaultHintTexts().copy(defaultText = "Slide to restore"), trackShape: Shape = RoundedCornerShape(percent = 50), thumbSize: DpSize = DpSize(ThumbSize, ThumbSize), fractionalThreshold: Float = 0.85f, paddings: PaddingValues = PaddingValues(SlideToUnlockDefaults.Paddings), hintPaddings: PaddingValues = PaddingValues(start = thumbSize.width, end = thumbSize.width), onSlideFractionChanged: (Float) -> Unit = {}, onSlideCompleted: () -> Unit = {}, orientation: SlideOrientation = SlideOrientation.Horizontal, thumb: @Composable BoxScope.(isSlided: Boolean, slideFraction: Float, colors: SlideToUnlockColors, size: DpSize, orientation: SlideOrientation) -> Unit = { slided, _, _, size, orient ->
SlideToUnlockDefaults.Thumb(
modifier = Modifier.size(thumbSize),
isSlided = slided,
colors = colors,
thumbSize = thumbSize,
orientation = orient,
)
}, hint: @Composable BoxScope.(isSlided: Boolean, slideFraction: Float, hintTexts: HintTexts, colors: SlideToUnlockColors, paddings: PaddingValues, orientation: SlideOrientation) -> Unit = { slided, fraction, _, _, paddings, orient ->
SlideToUnlockDefaults.Hint(
modifier = Modifier.align(Alignment.Center),
slideFraction = fraction,
hintTexts = hintTexts,
isSlided = slided,
colors = colors,
paddingValues = hintPaddings,
orientation = orient,
)
})
A composable that provides a slide-to-restore functionality.